(define-module (utils with-updated)
  #:use-module (gnu)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix)
  #:use-module (srfi srfi-1)
  #:export (with-updated))

(define (with-updated pkg
                      input-name
                      updated-package)
  (package
    (inherit pkg)
    (propagated-inputs
     `((,input-name ,updated-package)
       ,@(alist-delete input-name (package-propagated-inputs pkg))))))

